/* 路由守卫 */
import createPermissionGuard from './permissionGuard'
import createKeepaliveGuard from './keepAliveGuard'
import { Router } from 'vue-router'
import { useAppStore } from '@/store/modules/app'

/**
 * 设置路由守卫
 * 注意顺序，不能随意改变
 * @param { Object } router 路由实例
 */
export default function setRouterGuard(router:Router) {
  createKeepaliveGuard(router)
  // 添加权限拦截
  createPermissionGuard(router)
}
